package com.yanqu.road.enums;

import com.yanqu.road.utils.string.StringUtils;

public enum eClientLogUploadEventType {


    //LoadLoginPackageStart 开始加载登录包
    LoadLoginPackageStart(1,"LoadLoginPackageStart"),
    //LoadLoginPackageResult 加载登录包结果
    LoadLoginPackageResult(2,"LoadLoginPackageResult"),
    //LoadLoginResourceStart 开始加载登录资源
    LoadLoginResourceStart(3,"LoadLoginResourceStart"),
    //LoadLoginResourceResult 加载登录资源结果
    LoadLoginResourceResult(4,"LoadLoginResourceResult"),
    //RequestServerListStart 开始请求服务器列表
    RequestServerListStart(5,"RequestServerListStart"),
    //LoginOnLoginStart 旧号点击开始游戏，请求进入
    LoginOnLoginStart(6,"LoginOnLoginStart"),
    //LoginOnCreateRoleStart 新号点击开始游戏，请求进入
    LoginOnCreateRoleStart(7,"LoginOnCreateRoleStart"),
    //LoginOnLoginResult 点击开始游戏结果
    LoginOnLoginResult(8,"LoginOnLoginResult"),
    //OpenCreateRoleStart 开始打开创角界面
    OpenCreateRoleStart(9,"OpenCreateRoleStart"),
    //OpenCreateRoleResult 界面加载完成，显示创角界面
    OpenCreateRoleResult(10,"OpenCreateRoleResult"),
    //CreateRoleStart 创角开始
    CreateRoleStart(11,"CreateRoleStart"),
    //CreateRoleResult 创角结果
    CreateRoleResult(12,"CreateRoleResult"),
    //LoadMainResourceComplete 主界面资源全部加载完成
    LoadMainResourceComplete(13,"LoadMainResourceComplete"),
    //LoadMainResourceResult  主界面资源和全部协议下发完成
    LoadMainResourceResult(14,"LoadMainResourceResult"),
    //EnterMainLayerResult 显示主场界面
    EnterMainLayerResult(15,"EnterMainLayerResult"),

    ;

    int value;
    String name;

    eClientLogUploadEventType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }
    public String getName() {
        return name;
    }

    public static eClientLogUploadEventType valueOf(int value) {
        for (eClientLogUploadEventType item : eClientLogUploadEventType.values()) {
            if (item.value == value) {
                return item;
            }
        }
        return null;
    }

    public static eClientLogUploadEventType forValue(String name){
        if (StringUtils.isNullOrEmpty(name)){
            return null;
        }

        for (eClientLogUploadEventType item : eClientLogUploadEventType.values()) {
            if (item.name.equals(name)) {
                return item;
            }
        }
        return null;
    }



}
